home *** CD-ROM | disk | FTP | other *** search
-
- function plazmaball_fly()
- local explosion = uniGetExecutor()
- explosion:setTransformOwner()
- local mshot1 = explosion:addSimpleEffect(ENET_EFFECT_PS_NEWPLAZMABALL)
- local light = explosion:addSimpleEffect(ENET_EFFECT_NEWPLAZMABALL_LIGHTSPOT)
- waitDeath(explosion:parabolicFly(uniGetTarget()))
- mshot1:suspendedDestroy(5.0)
- local exp_ps = explosion:addSimpleEffect(ENET_EFFECT_PS_NEWPLAZMABALLEXPLOSION)
- uniGetTarget():executeCommand(ENC_DAMAGED)
- pause(1.0)
- exp_ps:suspendedDestroy(5.0)
- light:destroy()
- pause(3.0)
- explosion:destroy()
- end
-
- registerCommand(ENSCRIPTSET_NEWPLAZMABALL,ENC_FIRE1,"plazmaball_fly")
-
- --
- -- dummy effect creation test
- --
- desc = getEffectDescriptionP(ENET_EFFECT_PS_NEWPLAZMABALL_FLY)
- desc.ClassID = ENCLASS_DUMMY
- desc.EffectClassType = ENECT_GEOMETRY
-
- desc.ScriptSet = ENSCRIPTSET_NEWPLAZMABALL
- desc.RelativePosition = ENLOCALPOS_NOTSPECIFIED
- local vzbzd1 = D3DXVECTOR3:new(0,0,0)
- desc.LocalPosition = vzbzd1
- vzbzd1:delete()
- desc.MoveType = ENMOVE_FLY
-
- desc.ActivityType = ENACT_COMMANDSEMIACTIVE
- --
- -- end dummy effect creation test
- --
-
-
-
- --
- -- lightsource creation test
- --
- desc = getEffectDescriptionP(ENET_EFFECT_NEWPLAZMABALL_LIGHTSPOT)
- desc.ClassID = ENCLASS_LIGHTSOURCE
- desc.EffectClassType = ENECT_LIGHTSOURCE
-
- desc.ScriptSet = ENSCRIPTSET_UNKNOWN
- desc.RelativePosition = ENLOCALPOS_NOTSPECIFIED
- local vzbzd2 = D3DXVECTOR3:new(0,0,0)
- desc.LocalPosition = vzbzd2
- vzbzd2:delete()
- desc.ActivityType = ENACT_SEMIACTIVE
-
- -- add interpolators
- desc:clearInterpolators()
-
- local interpolator = createInterpolator()
- interpolator:addKey(0.0,70.0)
- interpolator:addKey(1.0,70.0)
- interpolator:finalize(false)
- -- add interpolator on light range
- desc:addInterpolator(interpolator,getFieldOffset(EN_FIELD_LIGHT_RANGE))
-
- local interpolator = createInterpolator()
- interpolator:addKey(0.0,0.1)
- interpolator:addKey(1.0,0.1)
- interpolator:finalize(false)
- -- add interpolator on R B colors
- desc:addInterpolator(interpolator,getFieldOffset(EN_FIELD_DIFFUSE_R))
- desc:addInterpolator(interpolator,getFieldOffset(EN_FIELD_DIFFUSE_B))
- desc:addInterpolator(interpolator,getFieldOffset(EN_FIELD_DIFFUSE_G))
-
-
- --
- -- end lightsource creation description
- --
-
-
-
-
-